When headless, we don't have a monitor we can derive a size from, so
don't even try, just let it be updated when we actually have a monitor
that will show stuff.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5831
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2478>
_updateWorkAreaBox() {
const monitor = Main.layoutManager.primaryMonitor;
+ if (!monitor)
+ return;
+
const workArea = Main.layoutManager.getWorkAreaForMonitor(monitor.index);
const startX = workArea.x - monitor.x;
const startY = workArea.y - monitor.y;